import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @author zhu
 * @date 2024-04-16
 */
public class MainTest01 {
    public static void main(String[] args) {
        List<String> list1 = Arrays.asList(
                "李商隐",
                "刘禹锡",
                "李太白",
                "王勃",
                "范仲淹"
        );
        List<String> list2 = Arrays.asList(
                "李白",
                "李贺",
                "王安石",
                "苏轼",
                "杨万里"
        );

        List<String> newList1 = list1.stream()
                .filter(t -> t.length() == 3)
                .limit(3)
                .collect(Collectors.toList());

        List<String> newList2 = list2.stream()
                .filter(t -> t.startsWith("李"))
                .skip(2)
                .collect(Collectors.toList());

        Stream<String> newStream = Stream.concat(newList1.stream(), newList2.stream());

        List<Student> list = newStream.map(Student::new).collect(Collectors.toList());

        list.forEach(System.out::println);
    }
}
